package com.pine.dcts.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pine.dcts.model.ITreeEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author xiaoyuan
 * @create 2020/11/23 14:05
 **/
@Setter
@Getter
@TableName("dcts_org")
public class Org extends BaseEntity implements ITreeEntity<Org> {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 机构名称
     */
    private String name;
    /**
     * 编码
     */
    private String code;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 父级机构id
     */
    private Integer parentId;
    /**
     * 子节点集合
     */
    @TableField(exist = false)
    private List<Org> children;
}
